<?php

$payment_unionpay_merId = Conf::get('payment_unionpay_merId');
$payment_unionpay_certpwd = Conf::get('payment_unionpay_certpwd');
$payment_unionpay_cert = Conf::get('payment_unionpay_cert');

if ($payment_unionpay_merId && $payment_unionpay_certpwd && $payment_unionpay_cert) {
    //商户号
    define('SDK_SIGN_MERID', $payment_unionpay_merId);
// 签名证书路径
    define('SDK_SIGN_CERT_PATH',ROOT_PATH . '/includes/payments/epayunionpay/certs/acp_sign.pfx');
// 签名证书密码
    define('SDK_SIGN_CERT_PWD', $payment_unionpay_certpwd);
// 密码加密证书（这条一般用不到的请随便配）
    define('SDK_ENCRYPT_CERT_PATH', ROOT_PATH . '/includes/payments/epayunionpay/certs/acp_enc.cer');
// 验签证书路径（请配到文件夹，不要配到具体文件）
    define('SDK_VERIFY_CERT_DIR', ROOT_PATH . '/includes/payments/epayunionpay/certs/');
// 前台请求地址
    define('SDK_FRONT_TRANS_URL', 'https://gateway.95516.com/gateway/api/frontTransReq.do');
// 后台请求地址
    define('SDK_BACK_TRANS_URL', 'https://gateway.95516.com/gateway/api/backTransReq.do');
// 批量交易
    define('SDK_BATCH_TRANS_URL', 'https://gateway.95516.com/gateway/api/batchTrans.do');
//单笔查询请求地址
    define('SDK_SINGLE_QUERY_URL', 'https://gateway.95516.com/gateway/api/queryTrans.do');
//文件传输请求地址
    define('SDK_FILE_QUERY_URL', 'https://filedownload.95516.com/');
//有卡交易地址
    define('SDK_Card_Request_Url', 'https://gateway.95516.com/gateway/api/cardTransReq.do');
//App交易地址
    define('SDK_App_Request_Url', 'https://gateway.95516.com/gateway/api/appTransReq.do');
// 前台通知地址 (商户自行配置通知地址)
    define('SDK_FRONT_NOTIFY_URL', 'http://localhost:8085/upacp_demo_b2c/demo/api_01_gateway/FrontReceive.php');
// 后台通知地址 (商户自行配置通知地址，需配置外网能访问的地址)
    define('SDK_BACK_NOTIFY_URL', 'http://222.222.222.222/upacp_demo_b2c/demo/api_01_gateway/BackReceive.php');
//文件下载目录 
    define('SDK_FILE_DOWN_PATH', ROOT_PATH . '/includes/payments/epayunionpay/file/');
//日志 目录 
    define('SDK_LOG_FILE_PATH', ROOT_PATH . '/includes/payments/epayunionpay/logs/');
//日志级别，关掉的话改PhpLog::OFF
    define('SDK_LOG_LEVEL', PhpLog::DEBUG);
    /** 以下缴费产品使用，其余产品用不到，无视即可 */
// 前台请求地址
    define('JF_SDK_FRONT_TRANS_URL', 'https://gateway.95516.com/jiaofei/api/frontTransReq.do');
// 后台请求地址
    define('JF_SDK_BACK_TRANS_URL', 'https://gateway.95516.com/jiaofei/api/backTransReq.do');
// 单笔查询请求地址
    define('JF_SDK_SINGLE_QUERY_URL', 'https://gateway.95516.com/jiaofei/api/queryTrans.do');
// 有卡交易地址
    define('JF_SDK_CARD_TRANS_URL', 'https://gateway.95516.com/jiaofei/api/cardTransReq.do');
// App交易地址
    define('JF_SDK_APP_TRANS_URL', 'https://gateway.95516.com/jiaofei/api/appTransReq.do');
} else {
    //商户号
    define('SDK_SIGN_MERID', '700000000000001');
// 签名证书路径
    define('SDK_SIGN_CERT_PATH', ROOT_PATH . '/includes/payments/epayunionpay/certs/acp_test_sign.pfx');
// 签名证书密码
    define('SDK_SIGN_CERT_PWD', '000000');
// 密码加密证书（这条一般用不到的请随便配）
    define('SDK_ENCRYPT_CERT_PATH', ROOT_PATH . '/includes/payments/epayunionpay/certs/acp_test_enc.cer');
// 验签证书路径（请配到文件夹，不要配到具体文件）
    define('SDK_VERIFY_CERT_DIR', ROOT_PATH . '/includes/payments/epayunionpay/certs/');
// 前台请求地址
    define('SDK_FRONT_TRANS_URL', 'https://101.231.204.80:5000/gateway/api/frontTransReq.do');
// 后台请求地址
    define('SDK_BACK_TRANS_URL', 'https://101.231.204.80:5000/gateway/api/backTransReq.do');
// 批量交易
    define('SDK_BATCH_TRANS_URL', 'https://101.231.204.80:5000/gateway/api/batchTrans.do');
//单笔查询请求地址
    define('SDK_SINGLE_QUERY_URL', 'https://101.231.204.80:5000/gateway/api/queryTrans.do');
//文件传输请求地址
    define('SDK_FILE_QUERY_URL', 'https://101.231.204.80:9080/');
//有卡交易地址
    define('SDK_Card_Request_Url', 'https://101.231.204.80:5000/gateway/api/cardTransReq.do');
//App交易地址
    define('SDK_App_Request_Url', 'https://101.231.204.80:5000/gateway/api/appTransReq.do');
// 前台通知地址 (商户自行配置通知地址)
    define('SDK_FRONT_NOTIFY_URL', 'http://localhost:8085/upacp_demo_b2c/demo/api_01_gateway/FrontReceive.php');
// 后台通知地址 (商户自行配置通知地址，需配置外网能访问的地址)
    define('SDK_BACK_NOTIFY_URL', 'http://222.222.222.222/upacp_demo_b2c/demo/api_01_gateway/BackReceive.php');
//文件下载目录 
    define('SDK_FILE_DOWN_PATH', ROOT_PATH . '/includes/payments/epayunionpay/file/');
//日志 目录 
    define('SDK_LOG_FILE_PATH', ROOT_PATH . '/includes/payments/epayunionpay/logs/');
//日志级别，关掉的话改PhpLog::OFF
    define('SDK_LOG_LEVEL', PhpLog::OFF);
    /** 以下缴费产品使用，其余产品用不到，无视即可 */
// 前台请求地址
    define('JF_SDK_FRONT_TRANS_URL', 'https://101.231.204.80:5000/jiaofei/api/frontTransReq.do');
// 后台请求地址
    define('JF_SDK_BACK_TRANS_URL', 'https://101.231.204.80:5000/jiaofei/api/backTransReq.do');
// 单笔查询请求地址
    define('JF_SDK_SINGLE_QUERY_URL', 'https://101.231.204.80:5000/jiaofei/api/queryTrans.do');
// 有卡交易地址
    define('JF_SDK_CARD_TRANS_URL', 'https://101.231.204.80:5000/jiaofei/api/cardTransReq.do');
// App交易地址
    define('JF_SDK_APP_TRANS_URL', 'https://101.231.204.80:5000/jiaofei/api/appTransReq.do');
    
}
?>